﻿@{
    Bundle("jquery_jqGrid");
}
           
<script type="text/javascript">
    jQuery(document).ready(function () {
        jQuery('@ID("#grid")').jqGrid({
            mtype: 'post',
            url: '@Url.Action(Loc.Act("History").Ctrl("SalesRule"))',
            postData: {
                ruleID: '@JDM.Int32(Model.EntityID)'
            },
            colNames:
            [
                '#',
                '@T(Res.Name("Order"))',
                '@T(Res.Name("Item"))',
                '@T(Res.Name("Flags"))',
                '&#10001;'
            ],
            colModel: 
            [
                { name: 'EntityID', align: 'center', width: 50, fixed: true, index: 'ID', title: false },
                { name: 'Order', align: 'center', sortable: false, title: false },
                { name: 'Item', align: 'center', sortable: false, title: false },
                { name: 'Flags', align: 'center', sortable: false, title: false },
                { name: 'CreatedOn', align: 'center', width: 200, fixed: true, index: 'CreatedOn', title: false }
            ],
            sortname: 'ID',
            sortorder: 'asc',
            pager: '@ID("#grid_pager")'
        });
    });
</script>
<table class="grid" id="@ID("grid")"></table>
<div class="pager" id="@ID("grid_pager")"></div>
